import React from 'react';
import Home from '@/views/home/index';
import {createMaterialTopTabNavigator} from '@react-navigation/material-top-tabs';
const Tab = createMaterialTopTabNavigator();

class TopTabs extends React.Component {
  render() {
    return (
      <Tab.Navigator
        screenOptions={{
          lazy: true,
          tabBarLabelStyle: {fontSize: 12},
          tabBarItemStyle: {width: 80},
          tabBarStyle: {backgroundColor: '#fff'},
          // 下划线样式
          tabBarIndicatorStyle: {
            height: 4,
            width: 20,
            marginLeft: 30,
            borderRadius: 2,
            backgroundColor: '#f86442',
          },
          tabBarActiveTintColor: '#f86442',
          tabBarInactiveTintColor: '#444',
        }}>
        <Tab.Screen
          name="Home"
          component={Home}
          options={{tabBarLabel: '推荐'}}
        />
      </Tab.Navigator>
    );
  }
}

export default TopTabs;
